<%@ page language="java" contentType="text/html;charset=utf-8" pageEncoding="utf-8"%>

<%@ include file="/core/taglibs.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">

<head>
<%@ include file="/core/memberMeta.jsp"%>
<!-- 防止重复提交 -->
<script type="text/javascript">
	var checkSubmitFlg = false;
	function checkSubmit() {

		if ($('#content').val() == '') {
			alert('请输入内容。');

			return false;
		}
		if ($('#password').val() == '') {
			alert('请输入安全密码。');

			return false;
		}

		var allowType = [ 'jpeg', 'pic', 'bmp', 'jpg', 'gif', 'png' ];
		var fileExt = getFileExt(fileVal);
		if (!allowType.contains(fileExt)) {
			alert('上传的文件不是正确的图片格式!');

			return false;
		}
		if (checkSubmitFlg == true) {
			return false;
		}
		checkSubmitFlg = true;
		return true;
	}
	document.ondblclick = function docondblclick() {
		window.event.returnValue = false;
	}
	document.onclick = function doconclick() {
		if (checkSubmitFlg) {
			window.event.returnValue = false;
		}
	}
</script>
</head>
<body>
	<script src="<%=basePath%>/resources/memberCss2/assets/js/theme.js"></script>
	<div class="page-heading">
		<h3>公司信息</h3>
		<ul class="breadcrumb">
			<li>公司信息</li>
			<li class="active">留言信息</li>
		</ul>
	</div>

	<section class="wrapper">
		<div class="row">
			<div class="col-sm-12">
				<section class="panel">
					<header class="panel-heading"> 留言内容 </header>

					<div class="panel-body">
						<h1 class="text-center cmnt-head">${message.title}</h1>
						
						
						<div class="media blog-cmnt">
							<div class="media-body imgMaxw">
								<h4 class="media-heading">
									<a href="#">留言内容</a>
								</h4>
								<div class="bl-status">
									<span class="pull-left">
										${o.operDate}
									</span> 
								</div>
								<c:if test="${message.filePath!=null}">
									<br />
									<a href="<%=basePath%>temp/${message.fileName}" target="_blank"> <img src='<%=basePath%>/temp/${message.fileName}'  />
									</a>
								</c:if>
								</br>
								${message.content}
								</br>
							</div>
						</div>
						
						<c:forEach items="${list}" var="o">
							<div class="media blog-cmnt">
								<div class="media-body imgMaxw">
									<h4 class="media-heading">
										<a href="#">留言回复</a>
									</h4>
									<div class="bl-status">
										<span class="pull-left">${o.operDate}</span>
									</div>
									
									
									<c:if test="${o.filePath!=null}">
										<br />
										<a href="<%=basePath%>temp/${o.fileName}" target="_blank"> <img src='<%=basePath%>/temp/${o.fileName}' />
										</a>
									</c:if>
									</br>
									${o.content}
									
								</div>
							</div>
						</c:forEach>
					</div>

					<div class="panel-body">
						

						<fieldset>

							<legend>留言回复</legend>

							<form class="form-horizontal adminex-form" action="member/info/messageShowAdd.shtml" enctype="multipart/form-data" method="post" onsubmit="return checkSubmit();">
								<jodd:form scopes="request" beans="message">
									<input type="hidden" id="id" name="id" />


									<div class="form-group">
										<label class="col-sm-2 col-sm-2 control-label">内容：</label>
										<div class="col-sm-10">
											<textarea id="content" class="form-control m-bot15" name="content" style="height: 70px;"></textarea>
										</div>
									</div>

									<div class="form-group">
										<label class="col-sm-2 col-sm-2 control-label">图片地址：</label>
										<div class="col-sm-10">
											<input type="file" class="form-control m-bot15" id="file" name="file" />
										</div>
									</div>

									<div class="form-group">
										<label class="col-sm-2 col-sm-2 control-label">安全密码：</label>
										<div class="col-sm-10">
											<input type="password" id="myTwoPassword" name="myTwoPassword" class="form-control m-bot15" />
										</div>
									</div>


									<div class="form-group text-center">${retMsg}</div>


									<div class="form-group text-center">
										<button type="submit" class="am-btn am-btn-primary tpl-btn-bg-color-success ">提交</button>
									</div>
								</jodd:form>
							</form>

						</fieldset>
					</div>
				</section>
			</div>
		</div>
	</section>
	<script src="<%=basePath%>/resources/memberCss2/assets/js/amazeui2.min.js"></script>
	<script src="<%=basePath%>/resources/memberCss2/assets/js/amazeui.datatables.min.js"></script>
	<script src="<%=basePath%>/resources/memberCss2/assets/js/dataTables.responsive.min.js"></script>
	<script src="<%=basePath%>/resources/memberCss2/assets/js/app.js"></script>
</body>

</html>

